#ifndef __WORLD_H
#define __WORLD_H

/*
WORLD.H

    The CWorld class

    Author: Kevin Hawkins
    Date: 3/29/2001
    Description: The CWorld class represents the game world
    of the engine. All objects, the terrain,
    audio system, ambient world music and sound,
    and the camera are held here.


*/

/*#include <dmusicc.h>               // DirectMusic includes
#include <dmusici.h>
#include <d3d8types.h>             // for D3DVECTOR
#include <cguid.h>                 // for GUID_NULL*/

#include "entity.h"
#include "jugador.h"
#include "contrario.h"
#include "md2.h"
#include "object.h"
#include "camera.h"
#include "terrain.h"
#include "audiosystem.h"
#include "tree.h"
#include "roadmap.h"
#include "gui.h"

class CWorld
{
protected:
    void OnAnimate(float deltaTime);
    void OnDraw(CCamera *camera);
    void OnPrepare();
     bool gameDone;

public:
/*     HWND hwnd;*/

    CTerrain *terrain;      // the terrain
    CCamera *camera;        // the camera
    CEntity *carretera;     // the circuit
    CEntity *mountain1;
    RoadMap *map; 
    CJugador *jugador;
    CContrario *contrario;
	CContrario *contrario2;
	int ncontrarios;


    CAudioSystem *audioSystem;    // the audio system
    CAudio *worldSound;           // the world ambient sound
    CAudio *gameMusic;            // the game's music
	CGUI *gui;
	
	 float timeStart;
     float timeElapsed;
	 
    CWorld();
    CWorld(CCamera *c);
    ~CWorld();

     // initialize terrain, load objects and put in container
    void LoadWorld();
    void UnloadWorld();

     // do physics calculations for all objects in the world
     // including collisions
    void Animate(float deltaTime);

     // render all objects in the world
    void Draw(CCamera *camera);

    void Prepare() { OnPrepare(); }
};


#endif
